package com.itqf.service.impl;

import com.itqf.mapper.DtsPermissionMapper;
import com.itqf.service.DtsPermissionService;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * projectName: shop_manage
 *
 * @author: MaTianWei
 * time: 2021/7/13 14:27
 * description:
 */
@Service
public class DtsPermissionServiceImpl implements DtsPermissionService {
    @Autowired
    private DtsPermissionMapper dtsPermissionMapper;

    public static final Logger logger = LoggerFactory.getLogger(DtsPermissionServiceImpl.class);
    @Override

    public Set<String> queryPermissionName(Integer[] roleIds) {
        if (roleIds == null || roleIds.length==0) {
            logger.warn("[权限查询业务]roleIds数组为nill");
        }

        Set<String>permission = dtsPermissionMapper.queryPermissionByRoleIds(roleIds);

        return permission;
    }
}
